﻿using System.Windows.Controls;

namespace Algoritmos_de_Ordenação
{
    public enum SpeedClicked
    {
        VerySlow = 2000,
        Slow = 1500,
        Normal = 1000,
        Fast = 500,
        VeryFast = 100
    }

    public class Menus
    {            
        public static void updatedItemChecked(SpeedClicked sc, MenuItem[] MenuItems)
        {
            foreach (MenuItem mi in MenuItems)
            {
                mi.IsChecked = false;
            }

            switch(sc)
            {
                case SpeedClicked.Fast: MenuItems[0].IsChecked = true;
                                        MenuItems[5].IsChecked = true;
                    break;
                case SpeedClicked.Normal: MenuItems[1].IsChecked = true;
                                          MenuItems[6].IsChecked = true;
                    break;
                case SpeedClicked.Slow: MenuItems[2].IsChecked = true;
                                        MenuItems[7].IsChecked = true;
                    break;
                case SpeedClicked.VeryFast: MenuItems[3].IsChecked = true;
                                            MenuItems[8].IsChecked = true;
                    break;
                case SpeedClicked.VerySlow: MenuItems[4].IsChecked = true;
                                            MenuItems[9].IsChecked = true;
                    break;
            }
        }
    }
}
